package com.molichuxing.services.infrastructure.dto.response;

import com.molichuxing.framework.dto.ResponseRootDto;
import com.molichuxing.services.property.LawsuitStateEnum;
import com.molichuxing.services.property.RecycleStateEnum;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.time.LocalDateTime;

/**
 * 法务诉讼列表 dto
 *
 * @Author zoumingyu
 * @Date 2020年07月30日
 */
@Data
public class LawsuitListDto extends ResponseRootDto {
    private static final long serialVersionUID = -6901796170839038453L;

    @ApiModelProperty(value = "订单号")
    private Long orderCode;

    @ApiModelProperty(value = "用户id")
    private Integer userId;

    @ApiModelProperty(value = "逾期天数合计")
    private Integer overdueDays;

    @ApiModelProperty(value = "逾期未还次数")
    private Integer overdueNum;

    @ApiModelProperty(value = "收车状态")
    private Integer recycleState;

    @ApiModelProperty(value = "收车状态str")
    private String recycleStateStr;

    @ApiModelProperty(value = "诉讼状态")
    private Integer lawsuitState;

    @ApiModelProperty(value = "诉讼状态str")
    private String lawsuitStateStr;

    @ApiModelProperty(value = "诉讼时间")
    private LocalDateTime lawsuitTime;

    public LawsuitListDto setRecycleState(Integer recycleState) {
        this.recycleState = recycleState;
        this.recycleStateStr = recycleState == null ? null : RecycleStateEnum.getName(recycleState);

        return this;
    }

    public LawsuitListDto setLawsuitState(Integer lawsuitState) {
        this.lawsuitState = lawsuitState;
        this.lawsuitStateStr = lawsuitState == null ? null : LawsuitStateEnum.getName(lawsuitState);

        return this;
    }
}
